package org.swqsbssddqs.shortlink.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import org.swqsbssddqs.shortlink.project.dao.entity.ShortLinkDO;
import org.swqsbssddqs.shortlink.project.dto.biz.ShortLinkStatsRecordDTO;
import org.swqsbssddqs.shortlink.project.dto.req.ShortLinkBatchCreateReqDTO;
import org.swqsbssddqs.shortlink.project.dto.req.ShortLinkCreatReqDTO;
import org.swqsbssddqs.shortlink.project.dto.req.ShortLinkPageReqDTO;
import org.swqsbssddqs.shortlink.project.dto.req.ShortLinkUpdateReqDTO;
import org.swqsbssddqs.shortlink.project.dto.resp.ShortLinkBatchCreateRespDTO;
import org.swqsbssddqs.shortlink.project.dto.resp.ShortLinkCreateRespDTO;
import org.swqsbssddqs.shortlink.project.dto.resp.ShortLinkGroupCountQueryRespDTO;
import org.swqsbssddqs.shortlink.project.dto.resp.ShortLinkPageRespDTO;

import java.util.List;

public interface ShortLinkService extends IService<ShortLinkDO> {
    ShortLinkCreateRespDTO createShortLink(ShortLinkCreatReqDTO shortLinkCreatReqDTOS);

    IPage<ShortLinkPageRespDTO> pageShortLink(ShortLinkPageReqDTO shortLinkPageReqDTO);

    List<ShortLinkGroupCountQueryRespDTO> listGroupShortLinkCount(List<String> gidList);

    Void updateShortLink(ShortLinkUpdateReqDTO shortLinkUpdateReqDTO);

    void redirectUrl(String shortUri, ServletRequest request, ServletResponse response);

    ShortLinkBatchCreateRespDTO batchCreateShortLink(ShortLinkBatchCreateReqDTO shortLinkBatchCreatReqDTOS);

    void actualShortLinkStats(ShortLinkStatsRecordDTO statsRecord);
}
